//
//  facePageCollectionViewCell.m
//  LT
//
//  Created by dllo on 16/5/23.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "facePageCollectionViewCell.h"
#import "UIImageView+WebCache.h"
@implementation facePageCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubview];
    }
    return self;
    
}

-(void)createSubview{


    self.nameLabel = [[UILabel alloc]init];
   // self.nameLabel.backgroundColor = [UIColor whiteColor];
    self.nameLabel.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.nameLabel];
    
    self.descriptionLabel = [[UILabel alloc]init];
   // self.descriptionLabel.backgroundColor = [UIColor whiteColor];
    self.descriptionLabel.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.descriptionLabel];
   
    self.total_threadsLabel = [[UILabel alloc]init];
  //  self.total_threadsLabel.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.total_threadsLabel];
    
    self.photo = [[UIImageView alloc]init];
   // self.photo.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.photo];
    
   
    
}

//给坐标
-(void)layoutSubviews{
    [super layoutSubviews];
    self.photo.frame = CGRectMake(5* WIDTHCELL, 10* WIDTHCELL, 60* WIDTHCELL, 60* WIDTHCELL);
    self.nameLabel.frame = CGRectMake(70* WIDTHCELL, 10* WIDTHCELL, 200* WIDTHCELL, 30* WIDTHCELL);
    self.descriptionLabel.frame = CGRectMake(70* WIDTHCELL, 40* WIDTHCELL, 200* WIDTHCELL, 30* WIDTHCELL);
    self.total_threadsLabel.frame = CGRectMake(230* WIDTHCELL, 10* WIDTHCELL, 100* WIDTHCELL, 20* WIDTHCELL);
    
   
}

-(void)setThirdModel:(ThirdModel *)thirdModel{
    _thirdModel = thirdModel;
    

    self.nameLabel.text = thirdModel.thirdName;
    self.descriptionLabel.text = thirdModel.myDescription;
    self.total_threadsLabel.text = thirdModel.total_threads ;
    [self.photo sd_setImageWithURL:[NSURL URLWithString:thirdModel.photo]];


}

@end
